<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/4/5
 * Time: 20:33
 */

namespace Admin\Model;


use Think\Model;

/**
 * Class AdminModel
 * @package Admin\Model
 * 用户管理
 */
class AdminModel extends Model
{
    protected  $pk='uid';
    protected  $tableName='admin';
    protected  $_validata=[

    ];
   /**
    * 用户添加
    */
    public  function  adduser($data){
        if($this->create($data)){
           $res= $this->add($data);
            return ['valid'=>$res,'msg'=>'操作成功'];
        }else{
            return ['valid'=>0,'msg'=>'操作失败'];
        }
    }

}